package com.hfkh.loop;

import java.util.Scanner;

public class DoWhileDemo {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String answer = "";
        do{
            System.out.println("上机编写一道编码题");
            System.out.print("老师检查是否通过(y/n),通过了吗？");
            answer = input.next();
        }while("n".equalsIgnoreCase(answer));
        System.out.println("恭喜你通过了测试！");
    }
}
